package org.blogwu.learn.jvmlearn.class1;

import java.util.Random;

public class MyTest1 {

    public static void main(String[] args) {
//        System.out.println(MyChild1.str);
        System.out.println("-------------------");
        System.out.println(MyChild1.ch);
    }

    public void pp() {
        System.out.println("i am MyTest1");
    }

}

class MyParent1 {
    public static String str = "hello World";

    public static final int ch = new Random().nextInt(50);

    static {
        System.out.println("MyParent1 static block");
    }

}

class MyChild1 extends MyParent1 {
    public static String str1 = "welcome";

    public final static String st2 = "2welcome";

    public static final int b = new Random().nextInt(50);


    static {
        System.out.println("MyChild1 static block");
    }
}

